package com.station.administrators.controller;

import com.github.pagehelper.PageInfo;
import com.open.capacity.common.model.UserModel;
import com.open.capacity.common.web.Result;
import com.station.administrators.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author YangGang
 * @Title: 用户管理
 * @Description: TODO
 * @date 2021/6/28/15:09
 */
@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private UserService userService;
    @GetMapping("/findAll")
    public Object findALl(UserModel userModel){
        PageInfo<UserModel> userModelList =userService.findAll(userModel);
        return Result.succeed(userModelList,"aaaaaaaa");
    }
    @GetMapping("/updateEnable")
    public Object updateEnable(UserModel userModel){
        userService.updateEnable(userModel);
        return Result.succeed("修改成功！");
    }
}
